﻿

using System.Collections.Generic;
/// <summary>
/// 服务端通知所有客户端操作指令
/// </summary>
class MsgKeyInputNtf : BaseProtocol
{
    public uint clientId = 0;
    public uint count = 0;
    public List<OpOrder> orderList = new List<OpOrder>();

    public override int ProtocolID
    {
        get
        {
            return 21106;
        }
    }
    /// <summary>
    /// Client
    /// </summary>
    protected override void ReadParams()
    {
        clientId = ReadUInt();
        count = ReadUInt();
        orderList = new List<OpOrder>();
        for (int i = 0; i < count; i++)
        {
            OpOrder order = new OpOrder();
            order.keyCode = ReadUInt();
            order.isBegin = ReadBool();
            order.exeTimePoint = ReadUInt();
            orderList.Add(order);
        }
    }
    /// <summary>
    /// Server
    /// </summary>
    protected override void WriteParams()
    {
        Write(clientId);
        count = (uint)orderList.Count;
        Write(count);
        for (int i = 0; i < count; i++)
        {
            Write(orderList[i].keyCode);
            Write(orderList[i].isBegin);
            Write(orderList[i].exeTimePoint);
        }
    }
}

